package com.atguigu.paymentdemo.service;

import java.io.IOException;
import java.security.GeneralSecurityException;
import java.util.Map;

public interface WxPayService {

    // 返回支付二维码链接和订单号
    Map<String, Object> nativePay(Long productId) throws Exception;

    // 处理订单
    void processOrder(Map<String, Object> bodyMap) throws GeneralSecurityException;

    // 用户取消订单
    void cancelOrder(String orderNo) throws Exception;

    // 查询订单
    String queryOrder(String orderNo) throws Exception;

    // 核实订单状态， 调用微信支付查询订单接口(害怕支付了钱，消息没有通知到)
    void checkOrderStatus(String orderNo) throws Exception;

    // 用户申请退款
    void refund(String orderNo, String reason) throws Exception;

    // 查询退款
    String queryRefund(String refundNo) throws Exception;

    // 处理退款单
    void processRefund(Map<String, Object> bodyMap) throws GeneralSecurityException;

    // 获取账单url
    String queryBill(String billDate, String type) throws Exception;

    // 下载账单
    String downloadBill(String billDate, String type) throws Exception;
}
